1. Field of the Invention
This invention relates to a method and apparatus for providing for notification of task termination and, more particularly, to a method and apparatus for providing for notification of process termination in a client/server system.
2. Description of the Related Art
Client/server computing systems are well known in the art. In a client/server system, a client process (or simply “client”) issues a request to a server process (or simply “server”), either on the same system or on a different system, to perform a specified service. Upon receiving the request, the server process performs the requested service and returns the result in a response to the client process.
When creating a client/server application on a single system, there is frequently a need for a client to communicate requests to a server and to wait for the server to respond. Similarly, there can be multiple server processes that need to communicate with multiple client processes. If a client is waiting for a response from a server and the server terminates, the client process may hang in a wait until a user or operator makes a request to terminate the client process. Similarly, a server may be waiting for a response from a client and have the client terminate. Both client and server can add timer calls into their logic to cause the wait to time out, but this can cause unnecessary path length and requires the client or server application to pick a suitable time period.
In UNIX®-based systems, there are several programming constructs that can be used to keep track of the connection between multiple processes. If an application uses a fork( ) or spawn( ) service to create a child process, then the two processes are tied together by the UNIX framework. That is, if the child process terminates, the parent process is sent a SIGCHLD signal. If the parent process terminates, the child process is sent a SIGHUP signal. However, since interacting server and client processes are usually not bound together by this parent-child relationship, this mechanism is of little use as a general notification mechanism in UNIX-based systems.